package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.hq.ims.data.entityenum.EnumFeedbackPhase;
import com.hq.ims.data.vo.BusInfoFeedbackMapstruct;
import com.hq.mybatis.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 蒋柏平
 * @since 20241024
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Alias("BusInfoFeedback")
@TableName(value = "bus_info_feedback")
@ApiModel(value = "经营信息反馈", description = "经营信息反馈")
public class BusInfoFeedback extends BaseModel<BusInfoFeedback> implements Serializable {

    @ApiModelProperty(value = "")
    @TableId(value = "bus_info_feedback_id", type = IdType.ASSIGN_UUID)
    private String busInfoFeedbackId;

    @ApiModelProperty(value = "经营信息跟踪ID")
    @TableField(value = "bus_info_track_id")
    private String busInfoTrackId;

    @ApiModelProperty(value = "产业标记ID")
    @TableField(value = "industry_mark_id")
    private String industryMarkId;

    @ApiModelProperty(value = "产业标记名称")
    @TableField(value = "industry_mark_name")
    private String industryMarkName;

    @ApiModelProperty(value = "反馈阶段")
    @TableField(value = "feedback_phase")
    private EnumFeedbackPhase feedbackPhase;

    @ApiModelProperty(value = "反馈时间")
    @TableField(value = "feedback_date")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime feedbackDate;

    @ApiModelProperty(value = "反馈内容")
    @TableField(value = "content")
    private String content;

    @ApiModelProperty(value = "是否有反馈文件标识")
    @TableField(value = "feedback_file_flag")
    private Boolean feedbackFileFlag;

    @ApiModelProperty(value = "经营人员ID")
    @TableField(value = "busi_person_id")
    private String busiPersonId;

    @ApiModelProperty(value = "经营人员名称")
    @TableField(value = "busi_person_name")
    private String busiPersonName;

    @ApiModelProperty(value = "派生的经营信息数量")
    @TableField(value = "derive_busi_info_count")
    private Integer deriveBusiInfoCount;

    @ApiModelProperty(value = "经营信息ID")
    @TableField(value = "busi_info_id")
    private String busiInfoId;

    @ApiModelProperty(value = "")
    @TableField(value = "create_date_time", fill = FieldFill.INSERT)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDateTime;

    @ApiModelProperty(value = "")
    @TableField(value = "update_date_time", fill = FieldFill.INSERT_UPDATE)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDateTime;

    @ApiModelProperty(value = "")
    @TableField(value = "create_user_name", fill = FieldFill.INSERT)
    private String createUserName;

    @ApiModelProperty(value = "")
    @TableField(value = "update_user_name", fill = FieldFill.INSERT_UPDATE)
    private String updateUserName;


    @ApiModelProperty(value = "")
    @TableField(value = "create_user_id", fill = FieldFill.INSERT)
    private String createUseId;

    @ApiModelProperty(value = "")
    @TableField(value = "update_user_id", fill = FieldFill.INSERT_UPDATE)
    private String updateUserId;

    @ApiModelProperty(value = "")
    @TableField(value = "org_id", fill = FieldFill.INSERT)
    private String orgId;

    @ApiModelProperty(value = "")
    @TableField(value = "version")
    @Version
    private Integer version;

    @ApiModelProperty(value = "")
    @TableField(value = "is_del")
    private Boolean isDel;

    public BusInfoFeedbackMapstruct.BusInfoFeedbackRowAuthVo auth() {
        BusInfoFeedbackMapstruct.BusInfoFeedbackRowAuthVo auth = new BusInfoFeedbackMapstruct.BusInfoFeedbackRowAuthVo(this);
        return auth;
    }

}
